Container View
背景
Container View Controller とは、複数の ViewController を組み合わせた ViewController であり、具体例としては UINavigationController や UITabBarController 等がある。
Container View
Container View は、ViewController に対する子となる View であり、Interface Builder 上で Container View Object として追加できる。この UI 要素自体はプレースホルダーであり、実態となる ViewController と Embed Segue で結線され、遷移する。Interface Builder のロード時には、親 ViewController のロードと同時に子 ViewController 群も同時に初期化される事になる。
https://developer.apple.com/library/archive/featuredarticles/ViewControllerPGforiPhoneOS/Art/container_view_embed_2x.png
Container View を利用せずに子 ViewController を扱いたい場合は、addChildViewController: を利用して programatically に追加できる。
View Controller Programming Guide for iOS - Implementing a Container View Controller